﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using HISModels.Entities;

namespace HISModels.ViewModel {

    /// <summary>
    /// Returns data by the criterion
    /// </summary>
    /// <param name="param">Request sent by DataTables plugin</param>
    /// <returns>JSON text used to display data
    /// <list type="">
    /// <item>sEcho - same value as in the input parameter</item>
    /// <item>iTotalRecords - Total number of unfiltered data. This value is used in the message: 
    /// "Showing *start* to *end* of *iTotalDisplayRecords* entries (filtered from *iTotalDisplayRecords* total entries)
    /// </item>
    /// <item>iTotalDisplayRecords - Total number of filtered data. This value is used in the message: 
    /// "Showing *start* to *end* of *iTotalDisplayRecords* entries (filtered from *iTotalDisplayRecords* total entries)
    /// </item>
    /// <item>aoData - Twodimensional array of values that will be displayed in table. 
    /// Number of columns must match the number of columns in table and number of rows is equal to the number of records that should be displayed in the table</item>
    /// </list>
    /// </returns>
    public class DataTablesNet {
        public int sEcho { get; set; }
        public int iTotalRecords { get; set; }
        public int iTotalDisplayRecords { get; set; }
        public IQueryable aaData { get; set; }
    }


    public class PostDataTablesNet {
        public int iDisplayLength { get; set; }
        public int iDisplayStart { get; set; }
        public int sEcho { get; set; }
        public string sSearch { get; set; }
    }

    public class AnonymousHeaderDetail {
        public object Header { get; set; }
        public IQueryable Detail { get; set; }
    }

    public class EventFullCalendarData
    {
        public string title { get; set; }
        public string start { get; set; }
        public string end { get; set; }
        public string url { get; set; }
        public bool allday { get; set; }

    }

    public class DoctorScheduleData {
        public string DoctorId { get; set; }
        public string DoctorCode { get; set; }
        public string Specialist { get; set; }
        public string DoctorName { get; set; }
        public string Location { get; set; }
        public string Sunday { get; set; }
        public string Monday { get; set; }
        public string Tuesday { get; set; }     
        public string Wednesday { get; set; }
        public string Thursday { get; set; }
        public string Friday { get; set; }
        public string Saturday { get; set; }
        public int IsInRange { get; set; } 
    }


    public class DataTablesNetAppointment {
        public int sEcho { get; set; }
        public int iTotalRecords { get; set; }
        public int iTotalDisplayRecords { get; set; }
        public List<DoctorScheduleData> aaData { get; set; }
    }

    public class PatientPayerData { 
         public int Id {get;set;}
         public int? CategoryId {get;set;}     
         public string CategoryName {get;set;}
         public string AddressDesc { get; set; }
         public string Phone { get; set; }
         public string Fax { get; set; }  
         public string PayerName {get;set;}                        
         public string PayerCode {get;set;}         
    }

    public class VPatientData {
        public Patient Patient { get; set; }
        public List<ViewDataAddress> ViewDataAddress { get; set; }
    }
}